/**
 * 
 */
package org.t2.game.server.module.rank.model;

import org.banish.sql.core.annotation.Column;
import org.banish.sql.core.annotation.Id;
import org.banish.sql.core.annotation.Index;
import org.banish.sql.core.annotation.Table;
import org.banish.sql.core.annotation.Id.Strategy;
import org.banish.sql.core.annotation.enuma.AsyncType;
import org.banish.sql.core.entity.AbstractEntity;
import org.gaming.service.repository.annotation.JvmCache;
import org.springframework.stereotype.Repository;

/**
 * 
 */
@Repository
@JvmCache(cacheTime = 0)
@Table(comment = "排行榜表", dbAlias = "game", asyncType = AsyncType.UPDATE, indexs = {
		@Index(fields = { "type" }) })
public class Ranker extends AbstractEntity {
	@Id(strategy = Strategy.IDENTITY)
	@Column(comment = "排行榜数据ID")
	private String id;
	@Column(comment = "排行榜类型", readonly = true)
	private int type;
	@Column(comment = "玩家ID", readonly = true)
	private long playerId;
	@Column(comment = "排行分数")
	private long score;
	@Column(comment = "次级分数")
	private long subScore;
	@Column(comment = "上榜时间")
	private long time;
	@Column(comment = "扩展数据", extra = "text")
	private String extraData;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public long getPlayerId() {
		return playerId;
	}

	public void setPlayerId(long playerId) {
		this.playerId = playerId;
	}

	public long getScore() {
		return score;
	}

	public void setScore(long score) {
		this.score = score;
	}

	public long getSubScore() {
		return subScore;
	}

	public void setSubScore(long subScore) {
		this.subScore = subScore;
	}

	public long getTime() {
		return time;
	}

	public void setTime(long time) {
		this.time = time;
	}

	public String getExtraData() {
		return extraData;
	}

	public void setExtraData(String extraData) {
		this.extraData = extraData;
	}
}
